package com.zpark.servlet_response;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @PackageName: com.zpark.servlet_response
 * @ClassName: ServletResponseDemo01
 * @Description:
 * @author: RZS
 * @date: 2023/3/9  16:57
 */
@WebServlet("/sp01.do")
public class ServletResponseDemo01 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // 设置响应行
        response.setStatus(50000);
        // response.sendError(5003, "服务器接收到请求，但是不想处理");
    }
}
